package de.dailab.graphworld.bean;

import de.dailab.graphworld.ontology.ContractNetGroup;
import de.dailab.jiactng.agentcore.comm.IGroupAddress;
import de.dailab.jiactng.agentcore.knowledge.IFact;
import java.util.Collection;
import java.util.Collections;

/**
 *
 * @author Kseniya
 */
public abstract class ContractNetProtocolMember extends BeanPhysical {

    @Override
    protected Collection<IGroupAddress> getGroups() {
        return Collections.singleton(getCnpGroup());
    }

    protected final IGroupAddress getCnpGroup() {
        return ContractNetGroup.getInstance().getAddress();
    }

    protected final void sendMsgGroup(IFact payload) {
        sendMsgGroup(payload, getCnpGroup());
    }
}
